﻿<Window x:Class="TouchBehaviorsSampleApp.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:tanagram="clr-namespace:Tanagram.Behaviors.Touch;assembly=Tanagram.Behaviors.Touch.WPF"
    xmlns:uc="clr-namespace:TouchBehaviorsSampleApp.UserControls"
    Title="Tanagram Touch Behaviors Sample App" Height="700" Width="1000">
    <TabControl>
        <TabItem Header="TouchScrollBehavior">
            <ListBox>
                <i:Interaction.Behaviors>
                    <tanagram:TouchScrollBehavior/>
                </i:Interaction.Behaviors>
                <ListBoxItem Content="String goes here1"></ListBoxItem>
                <ListBoxItem Content="String goes here2"></ListBoxItem>
                <ListBoxItem Content="String goes here3"></ListBoxItem>
                <ListBoxItem Content="String goes here4"></ListBoxItem>
                <ListBoxItem Content="String goes here5"></ListBoxItem>
                <ListBoxItem Content="String goes here6"></ListBoxItem>
                <ListBoxItem Content="String goes here7"></ListBoxItem>
                <ListBoxItem Content="String goes here8"></ListBoxItem>
                <ListBoxItem Content="String goes here9"></ListBoxItem>
                <ListBoxItem Content="String goes here10"></ListBoxItem>
                <ListBoxItem Content="String goes here1"></ListBoxItem>
                <ListBoxItem Content="String goes here2"></ListBoxItem>
                <ListBoxItem Content="String goes here3"></ListBoxItem>
                <ListBoxItem Content="String goes here4"></ListBoxItem>
                <ListBoxItem Content="String goes here5"></ListBoxItem>
                <ListBoxItem Content="String goes here6"></ListBoxItem>
                <ListBoxItem Content="String goes here7"></ListBoxItem>
                <ListBoxItem Content="String goes here8"></ListBoxItem>
                <ListBoxItem Content="String goes here9"></ListBoxItem>
                <ListBoxItem Content="String goes here10"></ListBoxItem>
                <ListBoxItem Content="String goes here1"></ListBoxItem>
                <ListBoxItem Content="String goes here2"></ListBoxItem>
                <ListBoxItem Content="String goes here3"></ListBoxItem>
                <ListBoxItem Content="String goes here4"></ListBoxItem>
                <ListBoxItem Content="String goes here5"></ListBoxItem>
                <ListBoxItem Content="String goes here6"></ListBoxItem>
                <ListBoxItem Content="String goes here7"></ListBoxItem>
                <ListBoxItem Content="String goes here8"></ListBoxItem>
                <ListBoxItem Content="String goes here9"></ListBoxItem>
                <ListBoxItem Content="String goes here10"></ListBoxItem>
                <ListBoxItem Content="String goes here1"></ListBoxItem>
                <ListBoxItem Content="String goes here2"></ListBoxItem>
                <ListBoxItem Content="String goes here3"></ListBoxItem>
                <ListBoxItem Content="String goes here4"></ListBoxItem>
                <ListBoxItem Content="String goes here5"></ListBoxItem>
                <ListBoxItem Content="String goes here6"></ListBoxItem>
                <ListBoxItem Content="String goes here7"></ListBoxItem>
                <ListBoxItem Content="String goes here8"></ListBoxItem>
                <ListBoxItem Content="String goes here9"></ListBoxItem>
                <ListBoxItem Content="String goes here10"></ListBoxItem>
                <ListBoxItem Content="String goes here1"></ListBoxItem>
                <ListBoxItem Content="String goes here2"></ListBoxItem>
                <ListBoxItem Content="String goes here3"></ListBoxItem>
                <ListBoxItem Content="String goes here4"></ListBoxItem>
                <ListBoxItem Content="String goes here5"></ListBoxItem>
                <ListBoxItem Content="String goes here6"></ListBoxItem>
                <ListBoxItem Content="String goes here7"></ListBoxItem>
                <ListBoxItem Content="String goes here8"></ListBoxItem>
                <ListBoxItem Content="String goes here9"></ListBoxItem>
                <ListBoxItem Content="String goes here10"></ListBoxItem>
                <ListBoxItem Content="String goes here1"></ListBoxItem>
                <ListBoxItem Content="String goes here2"></ListBoxItem>
                <ListBoxItem Content="String goes here3"></ListBoxItem>
                <ListBoxItem Content="String goes here4"></ListBoxItem>
                <ListBoxItem Content="String goes here5"></ListBoxItem>
                <ListBoxItem Content="String goes here6"></ListBoxItem>
                <ListBoxItem Content="String goes here7"></ListBoxItem>
                <ListBoxItem Content="String goes here8"></ListBoxItem>
                <ListBoxItem Content="String goes here9"></ListBoxItem>
                <ListBoxItem Content="String goes here10"></ListBoxItem>
                <ListBoxItem Content="String goes here1"></ListBoxItem>
                <ListBoxItem Content="String goes here2"></ListBoxItem>
                <ListBoxItem Content="String goes here3"></ListBoxItem>
                <ListBoxItem Content="String goes here4"></ListBoxItem>
                <ListBoxItem Content="String goes here5"></ListBoxItem>
                <ListBoxItem Content="String goes here6"></ListBoxItem>
                <ListBoxItem Content="String goes here7"></ListBoxItem>
                <ListBoxItem Content="String goes here8"></ListBoxItem>
                <ListBoxItem Content="String goes here9"></ListBoxItem>
                <ListBoxItem Content="String goes here10"></ListBoxItem>
                <ListBoxItem Content="String goes here1"></ListBoxItem>
                <ListBoxItem Content="String goes here2"></ListBoxItem>
                <ListBoxItem Content="String goes here3"></ListBoxItem>
                <ListBoxItem Content="String goes here4"></ListBoxItem>
                <ListBoxItem Content="String goes here5"></ListBoxItem>
                <ListBoxItem Content="String goes here6"></ListBoxItem>
                <ListBoxItem Content="String goes here7"></ListBoxItem>
                <ListBoxItem Content="String goes here8"></ListBoxItem>
                <ListBoxItem Content="String goes here9"></ListBoxItem>
                <ListBoxItem Content="String goes here10"></ListBoxItem>
                <Image Source="images/Koala.jpg" Height="50" Width="50"/>
                <Image Source="images/Penguins.jpg" Height="50" Width="50"/>
            </ListBox>
        </TabItem>
        <TabItem Header="TranslateRotateScaleBehavior">
            <Canvas ClipToBounds="True">
                <Canvas.Background>
                    <LinearGradientBrush StartPoint=".2,0" EndPoint=".7,1">
                        <GradientStop Color="Black" Offset="0"/>
                        <GradientStop Color="DarkSlateGray" Offset="1"/>
                    </LinearGradientBrush>
                </Canvas.Background>
                <Image Name="Image1" Source="Images/Koala.jpg" Width="200" Canvas.Top="100" Canvas.Left="25">
                    <i:Interaction.Behaviors>
                        <tanagram:TranslateRotateScaleBehavior XLocation="100" YLocation="100" MinimumScale="200" MaximumScale="1000"/>
                    </i:Interaction.Behaviors>
                </Image>
                <Image Name="Image2" Source="Images/Penguins.jpg" Width="200" Canvas.Top="200" Canvas.Left="230">
                    <i:Interaction.Behaviors>
                        <tanagram:TranslateRotateScaleBehavior XLocation="200" YLocation="200" MinimumScale="200" MaximumScale="300" />
                    </i:Interaction.Behaviors>
                </Image>
                <uc:EllipseItem x:Name="Ellipse1" Height="200" Width="200" Canvas.Top="300" Canvas.Left="435">
                    <i:Interaction.Behaviors>
                        <tanagram:TranslateRotateScaleBehavior 
                                CanTranslate="{Binding CanTranslateCheck, ElementName=Ellipse1,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                CanRotate="{Binding CanRotateCheck, ElementName=Ellipse1,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                CanScale="{Binding CanScaleCheck, ElementName=Ellipse1,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                XLocation="300" YLocation="300" />
                    </i:Interaction.Behaviors>
                </uc:EllipseItem>
            </Canvas>
        </TabItem>
    </TabControl>
</Window>
